home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / procssng / ccs / ccs-11tl.lha / lbl / hips / sources / scale_geom / window.h < prev   
Encoding:
C/C++ Source or Header  |  1991-09-17  |  793 b   |  27 lines

  1. #ifndef WINDOW_HDR
  2. #define WINDOW_HDR
  3.  
  4. /* $Header: window.h,v 2.0 88/10/10 13:46:30 ph Locked $ */
  5.  
  6. typedef struct {    /* WINDOW: A DISCRETE 2-D RECTANGLE */
  7.     int x0, y0;        /* xmin and ymin */
  8.     int x1, y1;        /* xmax and ymax (inclusive) */
  9. } Window;
  10.  
  11. typedef struct {    /* WINDOW_BOX: A DISCRETE 2-D RECTANGLE */
  12.     int x0, y0;        /* xmin and ymin */
  13.     int x1, y1;        /* xmax and ymax (inclusive) */
  14.     int nx, ny;        /* xsize=x1-x0+1 and ysize=y1-y0+1 */
  15. } Window_box;
  16.  
  17. /*
  18.  * note: because of the redundancy in the above structure, nx and ny should
  19.  * be recomputed with window_box_set_size() when they cannot be trusted
  20.  */
  21.  
  22. /* caution: we exploit positional coincidences in the following: */
  23. #define window_box_overlap(a, b) \
  24.     window_overlap((Window_box *)(a), (Window_box *)(b))
  25.  
  26. #endif
  27.